#include<stdio.h>
#include<string.h>
#include<math.h>
#include<stdlib.h>
#include<ctype.h>
#include<string.h>

#define SQUARE(x) (x)*(x)
#define MAX(x,y) ((x)>(y)?(x):(y))
#define MIN(x,y) ((x)<(y)?(x):(y))
#define SIZE(a)  (sizeof(a)/sizeof(a[0]))

typedef struct{
	double x,y;
}POINT;

void input(POINT*p){
	scanf("%lf%lf",&p->x,&p->y);
}
void output(POINT*p){
	printf("(%.2f,%.2f)\n",p->x,p->y);
}
double len(POINT *from,POINT*to){
    double dx=from->x - to->x;
    double dy=from->y - to->y;
	return sqrt(dx*dx+dy*dy);
}
int inc(const void*a,const void*b){
    POINT *pa=(POINT*)a,*pb=(POINT*)b;
    double dx=pa->x - pb->x,dy=pa->y - pb->y;
    if(dx)return dx>0?1:-1;
   	if(dy)return dy>0?1:-1;
    return 0;
}
int user(const void*a,const void*b){
    POINT *pa=(POINT*)a,*pb=(POINT*)b;
    POINT z={0,0};
    double da=len(pa,&z),db=len(pb,&z);
    double dd=da-db;
    if(dd)return dd>0?1:-1;
    return len(a,b);
}

POINT p[10];
int main(){
  //  freopen("A.txt","r",stdin);
  //  freopen("B.txt","w",stdout);
    int i;
    for(i=0;i<SIZE(p);i++) input(p+i);
 	qsort(p,SIZE(p),sizeof(p[0]),user);
  	for(i=0;i<SIZE(p);i++) output(p+i);
    return 0;
}
